using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class GlobalScript : MonoBehaviour
{
    private Camera mainCamera;
    public static GlobalScript instance;
    private void Awake() {
        instance = this;
        mainCamera = Camera.main;
    }
    public Vector3 GetMouseWorldPosition(){//获得鼠标的屏幕世界位置
        Vector3 mouseWorldPosition = mainCamera.ScreenToWorldPoint(Input.mousePosition);
        mouseWorldPosition.z = 0f;
        return mouseWorldPosition;
    }
}
